﻿using ChBusiness.PubInfo;
using ExtBusiness.Admin;
using ExtBusiness.FlowOperation;
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;


public partial class InsUrge_InsView : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            s_worktypeDataBind();
        }
    }

    protected void Submit_Click(object sender, EventArgs e)
    {
        string s_worktype = this.s_worktype.SelectedValue.ToString();
        string s_AppUnit = this.s_AppUnit.Value.ToString();
        string d_s = this.Date_begin.Value.ToString();
        string d_e = this.Date_end.Value.ToString();

        RepeaterDataBind(s_worktype, d_s, d_e, s_AppUnit);
    }

    protected void RepeaterDataBind(string s_worktype, string d_s, string d_e, string s_AppUnit)
    {
        TsInfoManager tsinfo = new TsInfoManager();

        bool ISsystemUser = SystemManager.IsSystemUser(UserId);
        Repeater1.DataSource = tsinfo.SearchTsInfo(UserId, s_worktype, d_s, d_e, s_AppUnit, ISsystemUser);
        Repeater1.DataBind();
    }

    protected void s_worktypeDataBind()
    {
        ClsWorkFlow clsWorkFlow = new ClsWorkFlow();
        this.s_worktype.DataSource = clsWorkFlow.GetFlowNameByUserID(UserId);
        this.s_worktype.DataTextField = "wname";
        this.s_worktype.DataValueField = "wname";
        this.s_worktype.DataBind();
        this.s_worktype.Items.Insert(0, "所有类型");
    }
}
